package com.jinlia.show.modules.system.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jinlia.show.modules.base.wxapp.entity.User;
import com.jinlia.show.modules.base.model.query.UserQuery;
import com.jinlia.show.modules.base.wxapp.service.UserMapperService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@RequestMapping("wx/user")
public class WxUserController {


    final UserMapperService userMapperService;

    @PostMapping("/page")
    public ResponseEntity<Page<User>> getPage(@RequestBody UserQuery queryParams
    ) {
        Page<User> result = userMapperService.getPage(queryParams);
        return ResponseEntity.ok(result);
    }
}
